-
Notifications
You must be signed in to change notification settings - Fork 92
Handle calibration files with extra cameras #207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Added adapt_P_and_calib_params to handle cases where the number of cameras in calibration files exceeds the number of pose folders, issuing warnings and adapting parameters accordingly. Updated personAssociation.py and triangulation.py to use this logic and provide clearer logging messages.
|
Thanks, Erwan! |
fix: avoid calib/pose camera mismatch with non-contiguous IDs The previous index-based alignment could assign wrong calibration parameters when cameras in calib file are non-contiguous (e.g. cam1, cam2, cam4, cam6). Remove adapt_P_and_calib_params. Handle pose-dir filtering directly in retrieve_calib_params() and computeP() via json_pose_dirs_names, and update personAssociation.py and triangulation.py accordingly.
|
I pushed a follow-up fix: the previous approach could mismatch camera parameters when the calib file contains non-contiguous camera IDs (e.g. cam1, cam2, cam4, cam6). The filtering is now done by camera name (from calib file) and json pose folder directly in retrieve_calib_params() and computeP(). adapt_P_and_calib_params() was removed. |
|
Hi Erwan, Let me know if I misunderstood anything:
This looks good to me, however could you address the couple of questions I asked in the review? Thanks, and I wish you a great new year's eve! |
ErwanBeurienne
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To handle misalignment between calibration files and pose folders (e.g., non-contiguous or missing camera IDs), the following changes were implemented:
- In common.py, the optional parameter json_pose_dirs_names was added to retrieve_calib_params and computeP, and used in personAssociation.py and triangulation.py.
- If the parameter is not provided, the behavior remains unchanged. When used, it associates cameras by name between calibration files and _json pose folders.
|
Hi David! Your understanding is correct. I addressed your questions in the PR comments. If "the review" refers to a specific section or format I missed, let me know where to add or move the information. |
|
And of course, I wish you a Happy New Year! |
|
Lol no problem! I truly appreciate your small iterative pull requests, I'm sorry it takes time to review them but I'm not forgetting them! |
Hello !
In this pull request, I add a new helper function, adapt_P_and_calib_params(), to handle cases where the number of cameras defined in the calibration files exceeds the number of pose folders available. This function issues clear warnings and automatically adapts the calibration parameters so that only the relevant cameras are used.
The main changes are:
This should make the pipeline more robust to inconsistent calibration/pose configurations while preserving existing behavior when the inputs are consistent.